# use third libs
if (OS_WINDOWS)
  set(sqlite_SOURCE_DIR ${COMMON_THIRD_LIB}/SQLiteCpp/$<CONFIG>)
elseif (OS_LINUX)
  find_package(SQLiteCpp REQUIRED)
endif()

macro(use_sqlite ag_project_name)
  target_compile_definitions(${ag_project_name} PRIVATE USE_LIB_SQLITE)

  if (OS_WINDOWS)
    target_include_directories(${ag_project_name} PRIVATE ${sqlite_SOURCE_DIR}/include)
    target_link_directories(${ag_project_name} PRIVATE ${sqlite_SOURCE_DIR}/lib)
    target_link_libraries(${ag_project_name} PRIVATE sqlite3 SQLiteCpp)
  elseif (OS_LINUX)
    target_link_libraries(${ag_project_name} PRIVATE sqlite3 SQLiteCpp)
  endif()
endmacro(use_sqlite)